package tech.heptagram.staff.mapper;

import org.apache.ibatis.annotations.Param;

import java.util.List;

import tech.heptagram.staff.model.Department;
import tech.heptagram.staff.query.DepartmentQuery;

/**
 * @author wang.yuchuan
 * @date 2018/9/10
 */
public interface DepartmentMapper {

    Department selectById(Integer id);

    List<Department> selectByQuery(DepartmentQuery query);

    List<Department> selectByStaffCode(String staffCode);

    Department selectByDingDepartmentId(@Param("dingDepartmentId")Long dingDepartmentId);

    int insert(Department department);

    void update(Department department);

    void delete(@Param("id") Integer id,@Param("deleteBy") String deleteBy);

    List<Department> selectByParentId(Integer parentId);
}
